package StateMode.version3;

/**
 * Copyright (C) 2018 北京金日恒升科技有限公司
 * 版权所有。
 * 文件名：Context
 * 功能描述：维护一个ConcreteState
 * 创建标识：闫传强
 * 2018/11/29 10:29
 **/
public class Context {

    private State state;
    public Context(State state){
        this.state=state;
    }

    public State getState() {
        return state;
    }

    public void setState(State state) {
        this.state = state;
        System.out.println("当前状态："+state.getClass().getName());
    }

    public void Request(){
        state.Handle(this);
    }




}
